# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=poweralertd
pkgver=0.2.0
pkgrel=2
pkgdesc="UPower-powered power alerter"
url="https://git.sr.ht/~kennylevinsen/poweralertd"
license="GPL-3.0"
arch="all !s390x !riscv64" # limited by upower
depends="upower"
makedepends="basu-dev meson scdoc"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/poweralertd/archive/$pkgver.tar.gz"

build() {
	abuild-meson \
		-Dman-pages=enabled \
		. output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
5fc804622a230956bd6205581e05ecb310febc8ee6e44bfde4ea9e0c7a506447a004df0020c450543d8a71791d966fbd59e57d35339493f77805c532799c8269  poweralertd-0.2.0.tar.gz
"
